
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

package com.hlkj.pay.common;

import com.hlkj.framework.common.exception.IErrorCode;
import com.hlkj.pay.common.constants.ResultCodeConstant;

/**
 * @author lyc
 */

public enum UserResultCode implements IErrorCode {
    USER_NOT_EXITS( ResultCodeConstant.USER_PREFIX+1, "用户不存在"),
    USER_RECHARGE_NOT_EXITS( ResultCodeConstant.USER_PREFIX+2, "用户充值记录不存在"),
    USER_COUPON_NOT_EXITS( ResultCodeConstant.USER_PREFIX+3, "用户优惠劵不存在"),
    USER_COUPON_NOT_EFFECT( ResultCodeConstant.USER_PREFIX+4, "用户优惠劵无效"),
    USER_RECHARGE_EXITS( ResultCodeConstant.USER_PREFIX+5, "当前存在充值中的记录,请等待充值完成后再发起充值"),
    USER_COUPON_USE_LIMIT( ResultCodeConstant.USER_PREFIX+7, "优惠劵1%s只能使用一次"),


    ;

    /**
     * 错误码
     */
    private final Integer code;
    /**
     * 错误提示
     */
    private final String msg;

    UserResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

}
